listbox: Activate single-click rows if n_press >= 1
authorTimm Bäder <mail@baedert.org>
Thu, 10 Sep 2020 05:01:18 +0000 (07:01 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 15 Sep 2020 03:21:54 +0000 (05:21 +0200)
Quickly clicking rows should always activate the row if
single-click-activation is enabled. Before, only the first click
(n_press == 1) would activate the row.

gtk/gtklistbox.c

index b028df0f1168e482c675a2f7c97205caee87bff1..c0028d83fd49d56766915916e2fa3f91e95f1f1a 100644 (file)
@@ -1832,9 +1832,9 @@ gtk_list_box_click_gesture_released (GtkGestureClick *gesture,
     {
       gboolean focus_on_click = gtk_widget_get_focus_on_click (GTK_WIDGET (box->active_row));
 
-      if (n_press == 1 && box->activate_single_click)
+      if (box->activate_single_click)
         gtk_list_box_select_and_activate_full (box, box->active_row, focus_on_click);
-      else
+      else if (n_press == 2)
         {
           GdkEventSequence *sequence;
           GdkInputSource source;